<template>
    <div>
        <!-- 轮播图 -->
        <swiper :swiperInfo="swiperInfo" :isfull="true"></swiper>

        <!-- 六宫格 -->
        <gong-ge></gong-ge>
    </div>
</template>

<script>
    import Swiper from '../../components/common/swiper/Swiper.vue'
    import GongGe from '../../components/content/gongge/GongGe.vue'
    import {Toast} from 'mint-ui'

    export default {
        name: "",
        data() {
            return {
                swiperInfo: []
            }
        },
        created() {
            this.getSwiperInfo()
        },
        methods: {
            getSwiperInfo() {
                this.$http.get('static/data/swiper.json').then(res => {
                    if (res.body.status === 0) {
                        this.swiperInfo = res.body.message
                    } else {
                        // 获取失败
                        Toast({
                            message: '获取轮播图失败'
                        })
                    }
                })
            }
        },
        components: {
            Swiper,
            GongGe
        }
    }
</script>

<style scoped>

</style>